package com.nf.text;

import com.nf.entity.Food;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test03 {
    public static void main(String[] args) {
    ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
    Food f1 = (Food) ac.getBean("apple");
    Food f2 = (Food) ac.getBean("banana");
    f1.support();
    f2.support();
}
}
